package com.yanfan.ccapicode.dao;


import com.yanfan.ccapicode.bean.UserClientInfoModel;
import com.yanfan.ccapicode.dao.base.iservice.IBaseRepository;
import com.yanfan.ccapicode.dao.entity.UserAuthorizeDO;
import com.yanfan.ccapicode.enums.ThirdPartyCloudEnum;

import java.util.List;


/**
 * :)
 *
 */
public interface UserAuthorizeRepository extends IBaseRepository<UserAuthorizeDO> {

    /**
     *
     * @param userId
     * @param cloud
     * @return
     */
    UserAuthorizeDO selectByUserIdAndThirdPartyCloud(String userId, ThirdPartyCloudEnum cloud);

    /**
     * 根据主键更新t
     * @param userAuthorizeDO
     * @param cloud
     */
    void updateByUserIdAndThirdPartyCloud(UserAuthorizeDO userAuthorizeDO, ThirdPartyCloudEnum cloud);

    UserClientInfoModel selectUserClientInfo(String userId, ThirdPartyCloudEnum cloud);

    List<UserAuthorizeDO> selectByUserIds(List<String> userIds);

    List<UserAuthorizeDO> selectCcapiUserAuthorizeList(UserAuthorizeDO userAuthorizeDO);

}
